package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.wxqcontactrefresh.WxqContactRefreshQuery;
import com.uzai.console.entity.WxqContactRefresh;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WxqContactRefreshMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int batchDelete(List<Long> list);

    int insert(WxqContactRefresh record);

    int batchAdd(List<WxqContactRefresh> list);

    int insertSelective(WxqContactRefresh record);

    WxqContactRefresh selectById(@Param("id") Long id, @Param("merId") Long merId);

    WxqContactRefresh selectByDeviceUniqueId(@Param("deviceUniqueId") Long deviceUniqueId, @Param("merId") Long merId);

    WxqContactRefresh selectByDeviceId(@Param("deviceId") String deviceId);

    int updateByIdSelective(WxqContactRefresh record);

    int updateById(WxqContactRefresh record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    List<WxqContactRefresh> findByList(Page<WxqContactRefresh> page, @Param("query") WxqContactRefreshQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    List<WxqContactRefresh> findByList(@Param("query") WxqContactRefreshQuery query);

    /**
     * 查询总数
     *
     * @param query
     * @param query
     * @return
     */
    Integer findCount(@Param("query") WxqContactRefreshQuery query);
}